tool
class_name Single, "res://ecs/icons/single.svg"
extends Notify

export(Resource) var resource

var data = null


func _init(_name = ""):
	if _name:
		self.name = _name


func _ready():
	if not resource:
		return
	if Engine.editor_hint:
		self.name = "Single<%s>" % resource.get("component_name")
	else:
		self.name = resource.get("component_name")  #same name with resource
	data = resource.new()
	data.set("_notify", self)
